﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jobping.StickyBeak.UI
{
	public class HtmlConstants 
	{
		public static readonly string Header =
			@"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"">
<head>
    <title>Sticky Beak</title>
    <link href='/StickyBeak/Embed/Global.css' rel='stylesheet' type='text/css' />	
	<script type='text/javascript' src='http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js'></script>
<style>
<!--
body
{
    font-family: Verdana, Arial;
    font-size: 62.5%;
	color: #222;
}

#frame { font-size: 1.2em;}
form { margin: 10px 0; text-align: right; background-color: #eee; border: solid 1px #ccc; padding: 10px;} 
table { border-collapse: collapse; width: 100%;}
table tr th { border: solid 1px #ccc; text-align: left; ; background-color: #eee;}
table tr td { border: solid 1px #ccc; vertical-align: top; cursor: pointer;}
table tr td, table tr th { padding: 2px;}

table td.last { width: 604px; }
table tr.even td { background-color: #f5f5f5;}
table .target { display: none; }
table tr.selected td  { background-color: #eeee00;}
table tr.selected .target {display: block;  width: 588px;  padding: 5px;   position: fixed; right: 10px; top: 150px; 
                        background-color: #eee; border: solid 1px #000; padding-bottom: 10px; overflow: auto; }
table tr.selected td table { width: 100%;}
table tr.selected td table td, table tr td table th { background-color: #fff;}
table tr.selected td table th {width: 120px;}
.target h6 { margin: 10px 0; padding: 0; font-size: 1.1em;}

.empty { background-color: #fff; border: solid 1px #000; padding: 5px; text-align: center;}
#info { float: left; text-align: left;}
-->
</style>
</head>
<body>
	<div id='frame'>
		<div id='header'>
			<h1>StickyBeak</h1>
		</div>	
		<div id='content'>
";
		
		public static readonly string Footer = @"<script type='text/javascript'>
			jQuery(function(){
				$('table > tbody > tr:even').addClass('even');
				$('tr .target').click(function(e){ e.stopPropagation();});

				$('tr').click(function(e){ 
				var row = $(this); 
				if(row.hasClass('selected'	))
				{
					row.removeClass('selected');
					return;
				}
				row.parent().find('tr.selected').removeClass('selected'); 
				row.addClass('selected');
				});

				$('select').change(function(){ $(this).next('input[type=""submit""]').click(); }).next('input[type=""submit""]').hide();
			});

			</script></div></div></body></html>";

	}
}
